home *** CD-ROM | disk | FTP | other *** search
/ CD School House 9 / CD School House 9.0 - Wayzata Technology (1994).iso / pc / games / mac / __the_arcade__ / mr._ball_s_game / background_2745.txt < prev    next >
Text File  |  1991-02-12  |  4KB  |  194 lines

  1. -- background: 2745 from stack: in._ball_s_game
  2. -- bmap block id: 3127
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on idle
  8.   move 0,5
  9.   check
  10. end idle
  11.  
  12. on arrowkey dir
  13.   put the loc of bg btn "mr. ball" into oldloc
  14.   if dir is "left" then move -20,0
  15.   if dir is "up" then move 0,-20
  16.   if dir is "right" then move 20,0
  17.   if dir is "down" then move 0,20
  18.   check
  19.   if the loc of bg btn "Mr. Ball" is not within "0,0,512,342" then
  20.     play "boing"
  21.     set the loc of bg btn "mr. ball" to  oldloc
  22.   end if
  23. end arrowkey
  24.  
  25. on move h,v
  26.   set the loc of bg btn "mr. ball" to item 1 of the loc of bg btn "mr. ball"+h,item 2 of the loc of bg btn "mr. ball"+v
  27. end move
  28.  
  29. on check
  30.   repeat with i = 1 to the number of cd btns
  31.     if the loc of bg btn "mr. ball" is within the rect of cd btn i then
  32.       special i
  33.       if the result is true then exit check
  34.       coin i
  35.       if the result is true then exit check
  36.       bump
  37.       exit check
  38.     end if
  39.   end repeat
  40.   if the loc of bg btn "mr. ball" is within the rect of bg btn "next"
  41.   then
  42.   set the loc of bg btn "mr. ball" to the loc of bg btn "next"
  43.   lock screen
  44.   go to next card
  45.   show bg btn "mr. ball" at 256,20
  46.   play "Harpsichord"
  47.   unlock screen with visual scroll up
  48. end if
  49. end check
  50.  
  51. on opencard
  52.   repeat with i = 1 to the number of cd btns
  53.     show cd btn i
  54.   end repeat
  55.   put "World"&&the number of this card into bg fld "status"
  56.   updateguys
  57. end opencard
  58.  
  59. on special i
  60.   if the short name of cd btn i is "special" then
  61.     send stuff to cd btn i
  62.     return true
  63.   end if
  64. end special
  65.  
  66. on updateguys
  67.   global guys,coins
  68.   if guys is empty then exit updateguys
  69.   put empty into bg fld "guys"
  70.   repeat with i = 1 to guys
  71.     put "ΓÇó " after bg fld "guys"
  72.   end repeat
  73.   put coins into bg fld "coins"
  74. end updateguys
  75.  
  76. on bump
  77.   global guys
  78.   play "boing"
  79.   if guys is 0 then
  80.     go to card "Lost"
  81.   else
  82.     subtract 1 from guys
  83.     updateguys
  84.     set the loc of bg btn "mr. ball" to 256,20
  85.   end if
  86. end bump
  87.  
  88. on coin i
  89.   global coins
  90.   if the short name of cd btn i is "coin" then
  91.     if the visible of cd btn i is false then exit to hypercard
  92.     add 1 to coins
  93.     put coins into bg fld "coins"
  94.     hide cd btn i
  95.     return true
  96.   end if
  97. end coin
  98.  
  99.  
  100.  
  101.  
  102. -- part 1 (button)
  103. -- low flags: 00
  104. -- high flags: 0000
  105. -- rect: left=237 top=73 right=107 bottom=276
  106. -- title width / last selected line: 0
  107. -- icon id / first selected line: 1234 / 1234
  108. -- text alignment: 1
  109. -- font id: 0
  110. -- text size: 12
  111. -- style flags: 0
  112. -- line height: 16
  113. -- part name: Mr. Ball
  114.  
  115.  
  116. -- part 2 (button)
  117. -- low flags: 00
  118. -- high flags: 8002
  119. -- rect: left=0 top=271 right=319 bottom=512
  120. -- title width / last selected line: 0
  121. -- icon id / first selected line: 18602 / 18602
  122. -- text alignment: 1
  123. -- font id: 0
  124. -- text size: 12
  125. -- style flags: 0
  126. -- line height: 16
  127. -- part name: Next
  128.  
  129.  
  130. -- part 3 (field)
  131. -- low flags: 01
  132. -- high flags: 0001
  133. -- rect: left=0 top=319 right=342 bottom=79
  134. -- title width / last selected line: 0
  135. -- icon id / first selected line: 0 / 0
  136. -- text alignment: 0
  137. -- font id: 152
  138. -- text size: 12
  139. -- style flags: 0
  140. -- line height: 16
  141. -- part name: Status
  142.  
  143.  
  144. -- part 4 (button)
  145. -- low flags: 00
  146. -- high flags: 8001
  147. -- rect: left=468 top=320 right=342 bottom=512
  148. -- title width / last selected line: 0
  149. -- icon id / first selected line: 0 / 0
  150. -- text alignment: 1
  151. -- font id: 0
  152. -- text size: 12
  153. -- style flags: 0
  154. -- line height: 16
  155. -- part name: Start
  156. ----- HyperTalk script -----
  157. on mouseUp
  158.   global guys,coins
  159.   put 0 into coins
  160.   put 3 into guys
  161.   go to first card
  162.   updateguys
  163.   set the loc of bg btn "mr. ball" to 256,20
  164. end mouseUp
  165.  
  166.  
  167.  
  168. -- part 5 (field)
  169. -- low flags: 01
  170. -- high flags: 0001
  171. -- rect: left=119 top=319 right=342 bottom=265
  172. -- title width / last selected line: 0
  173. -- icon id / first selected line: 0 / 0
  174. -- text alignment: 0
  175. -- font id: 152
  176. -- text size: 12
  177. -- style flags: 0
  178. -- line height: 16
  179. -- part name: Guys
  180.  
  181.  
  182. -- part 6 (field)
  183. -- low flags: 01
  184. -- high flags: 0001
  185. -- rect: left=371 top=323 right=340 bottom=408
  186. -- title width / last selected line: 0
  187. -- icon id / first selected line: 0 / 0
  188. -- text alignment: 0
  189. -- font id: 21
  190. -- text size: 12
  191. -- style flags: 0
  192. -- line height: 16
  193. -- part name: coins
  194.